{% extends "myadmin/base.html" %}


{% block mainbody %}
    <h2>
        商品信息浏览
    </h2>
    <table class="table table-bordered table-striped">
        <thead>
        <tr>
            <th> id </th>
            <th> 商品名称</th>
            <th> 商品类别</th>
            <th> 图片</th>
            <th> 价格</th>
            <th> 点击量</th>
            <th> 状态</th>
            <th> 操作</th>
        </tr>
        </thead>
        <tbody>
        {% for vo in goodslist %}
            <tr>
                <td>{{ vo.id }}</td>
                <td>{{ vo.goods }}</td>
                <td>{{ vo.typename }} </td>
                <td><img src="/static/goods/s_{{ vo.picname }}" width="40" height="40"/></td>
                <td>{{ vo.price }} </td>
                <td>{{ vo.clicknum }} </td>
                <td>{{ vo.state }} </td>
                <td>
                    <a href="{% url 'myadmin_goods_edit' vo.id %}" class="view-link">编辑</a>
                    <a href="{% url 'myadmin_goods_del' vo.id %}" class="view-link">删除</a>
                </td>
            </tr>
        {% endfor %}

        </tbody>
    </table>
    <div class="pagination">
        <ul>
            <li class="disabled">
                <a href="{% url 'myadmin_goods_index' pIndex|add:-1 %}">&laquo;</a>
            </li>
            {% for pp in plist %}
                    <li {% if pIndex == pp %} class="active" {% endif %}>
                        <a href="{% url 'myadmin_goods_index' pp %}">{{ pp }}</a>
                    </li>
            {% endfor %}
            <li>
                <a href="{% url 'myadmin_goods_index' pIndex|add:1 %}">&raquo;</a>
            </li>
        </ul>
    </div>
    </div>

{% endblock %}